﻿using System;
using System.Net;
using System.Collections.Generic;

namespace Airport
{
    public class Runway : Surface
    {

        private int _heading;
        private ArriveDepartStatus _arriveDepartStatus;

        /// <summary>
        /// Two overloaded contstructors for runway. We can start a runway with one node, or we can just give it a list of nodes.
        /// </summary>
        /// <param name="nodes or node"> </param>

        public Runway()
            : base()
        {
            _heading = -1;
        }

        public Runway(int id, string n, int maxW, int len, int wid, int elev, int head, ArriveDepartStatus ads)
            : base(id, n, maxW, len, wid, elev)
        {
            _heading = head;
            _arriveDepartStatus = ads;
        }

        public int heading
        {
            get
            {
                return _heading;
            }

            set
            {
                if (_heading != value)
                {
                    _heading = value;
                }
            }
        }

        public ArriveDepartStatus arriveDepartStatus
        {
            get
            {
                return _arriveDepartStatus;
            }

            set
            {
                if (_arriveDepartStatus != value)
                {
                    _arriveDepartStatus = value;
                }
            }
        }

        public enum ArriveDepartStatus
        {
            ARRIVE,
            DEPART,
            ARRIVE_DEPART
        }

        public void addNode(Node node)
        {
            nodes.Add(node);
        }
    }
}
